package sysu.el.array.ints.functors;

public class Fun1 {
	public static abstract class Int{
		public abstract void apply(int value);
		
		public static class Top2 extends Fun1.Int{
			int max1; int max2;
			@Override
			public void apply(int value) {
				if (max1 < value){
					max2 = max1;
					max1 = value;
				}else if (max2 < value){
					max2 = value;
				}
			}
		}
	}
	
	public static abstract class Dbl{
		public abstract void apply(int value);
		
		public static class Top2 extends Fun1.Int{
			int max1; int max2;
			@Override
			public void apply(int value) {
				if (max1 < value){
					max2 = max1;
					max1 = value;
				}else if (max2 < value){
					max2 = value;
				}
			}
		}
	}	
	


}
